import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/oj/login",
      name: "login",
      component: () => import("../views/login.vue"),
    },
    {
      path: "/oj/test",
      name: "test",
      component: () => import("../views/test.vue"),
    },
    {
      path: "/oj/layout",
      name: "layout",
      component: () => import("../views/layout.vue"),
      children: [
        {
          path: "cuser",
          name: "cuser",
          component: () => import("../views/cuser.vue"),
        },
        {
          path: "exam",
          name: "exam",
          component: () => import("../views/exam.vue"),
        },
        {
          path: "question",
          name: "question",
          component: () => import("../views/question.vue"),
        },
        {
          path: "updateExam",
          name: "updateExam",
          component: () => import("../views/UpdateExam.vue"),
        },
      ],
    },
  ],
});

export default router;
